package HomeWork;

/*
 *@auther will
 *@version 1.0
 */

//局部内部类的作业
public class Homework05 {
    public static void main(String[] args) {
        A a = new A();
        a.f1();
    }
}

class A{
    private String NAME = "hello";
    public void f1(){
        class B{
            private final String NAME = "韩顺平教育";
            public void show(){
                //如果内部类和外部类的属性重名，可以通过外部类名.this.属性名来指定
                System.out.println("NAME:"+NAME+"外部类的name="+A.this.NAME);
            }
        }
        B b = new B();
        b.show();
    }
}